package gx.clic.lottery.dao.util;

import org.apache.ibatis.session.ExecutorType;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.beans.factory.annotation.Autowire;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SessionUtil {
	@Autowired SqlSessionFactory fact;
	@Bean(name="batchSession")
	public SqlSession getBatchSession () {
		return fact.openSession(ExecutorType.BATCH);
	}
}
